<template>
  <div style="background-color: white;height: 100%">
    <div>
      <van-nav-bar
          left-arrow
          @click-left="onClickLeft"
      />
    </div>
    <div style="margin: 30px 0">
      <van-icon name="checked" size="5rem" color="#07c160"/>
      <br>
      <span style="font-size: 25px">提现成功</span>
    </div>
    <div>
      <van-cell title="提现到" :value="withdrawMsg.toBank" style="text-align: left"/>
      <van-cell title="提现金额" :value="withdrawMsg.money+'￥'" style="text-align: left"/>
    </div>
    <div style="margin: 80px 0">
      <van-button class="but" round plain hairline type="info" @click="achieve">完成</van-button>
      <van-button class="but" style="border: 0;margin-bottom: 10px" round type="default" @click="gowithdrawdetail">查看详情</van-button>
    </div>
  </div>
</template>

<script>
import axios from "axios";

export default {
  data() {
    return {
      withdrawMsg:{},
      id:''
    }
  },
  mounted() {
    let id = this.$route.query.id;
    this.id=id
    this.getWithdarwDetailbyId(id)
  },
  methods: {
    achieve(){
      this.$router.push({
        path: '/withdraw'
      })
    },
    onClickLeft() {
      this.$router.push({
        path: '/withdraw'
      })
    },
    gowithdrawdetail(){
      this.$router.push({
        path: '/withdrawdetail',
        query:{
          id:this.id
        }
      })
    },
    getWithdarwDetailbyId(id){
      axios.get('http://localhost:11219/mine/withdraw/getwithdrawdetailbyid/'+id).then(res=> {
        this.withdrawMsg = res.data
      })
    }
  }
}
</script>

<style scoped>
.but{
  width: 90%;
  margin: 5px 0;
}
.but::before{
  background-color:transparent!important;
}
</style>
